#测试云存储介绍首页
import time
from selenium.webdriver.common.by import By
from common.Utils import CloudDriver

class HomePage:
    #需要获取url,定义成员
    url=""
    #驱动对象
    driver=""
    def __init__(self):
        self.url="http://vnollx.cloud/"
        self.driver=CloudDriver.driver
        self.driver.get(self.url)

    #测试点击立即体验按钮是否跳转，前提先访问介绍页面
    def ButtonTestImmediately(self):
        #通过驱动对象查找元素
        self.driver.find_element(By.CSS_SELECTOR,"body > main > section.hero > a").click()
        #根据跳转后的页面元素来确定是否跳转成功
        self.driver.find_element(By.CSS_SELECTOR,"#form > h1")
        # time.sleep(3)
        # self.driver.quit()

#fordebug
# homepage=HomePage()
# homepage.ButtonTestImmediately()
